function getPageInitData(type){
	var iconStr = ''
	var methodStr = ''
	var detailM = ''
	var titleStr = type;
	var pageArr = []
	switch (type){
		case '专科活动备案':
			iconStr='ic_work_zk_01'
			methodStr="web.INMSpecialComm:FindActivityList"
			detailM = 'web.INMSpecialComm:GetActivity'
			pageArr = [{'title':'病区','key':'ActivityWardDesc'},{'title':'参与人','key':'ActivityNurseName'},
				{'title':'活动形式','key':'ActivityTypeDesc'},{'title':'参与形式','key':'ActivityParTypeDesc'},
				{'title':'级别','key':'ActivityLevelDesc'},{'title':'活动日期','key':'ActivityDate'},
				{'title':'活动主题','key':'ActivityTopic'},{'title':'活动地点','key':'ActivityLocation'},
				{'title':'附件','key':'ActivityFile','type':'file'}]
			break;
		case '课题专案备案':
			iconStr='ic_work_zk_02'
			methodStr="web.INMSpecialComm:FindCaseList"
			detailM = 'web.INMSpecialComm:GetCase'
			pageArr = [{'title':'病区','key':'CaseWardDesc'},{'title':'参与人','key':'CaseNurseName'},
				{'title':'课题/专案','key':'CaseTypeDesc'},{'title':'参与形式','key':'CaseParTypeDesc'},
				{'title':'级别','key':'CaseLevelDesc'},{'title':'开始日期','key':'CaseStDate'},
				{'title':'结束日期','key':'CaseEndDate'},{'title':'主题','key':'CaseTopic'}]
			break;
		case '规范参与备案':
			iconStr='ic_work_zk_03'
			methodStr = 'web.INMSpecialComm:FindStandardList'
			detailM = 'web.INMSpecialComm:GetStandard'
			pageArr = [{'title':'类型','key':'StandardTypeDesc'},{'title':'制定/修订','key':'StandardTypeSubDesc'},
				{'title':'名称','key':'StandardDesc'},{'title':'专业组','key':'StandardGroupDesc'},
				{'title':'参与人','key':'StandardParticipantName'},{'title':'附件','key':'StandardFile','type':'file'}]
			break;
		default:
			break;
	}
	return {'icon':iconStr,'titleStr':titleStr,'method':methodStr,'detailM':detailM,'pageArr':pageArr}
}

function getZkStatusKey(type){
	var statusKey=''
	switch (type){
		case '专科活动备案':
			statusKey = 'ActivityStatusDesc'
			break;
		case '课题专案备案':
			statusKey = 'CaseStatusDesc'
			break;
		case '规范参与备案':
			statusKey = 'StandardStatusDesc'
			break;
		default:
			break;
	}
	return statusKey
}


function getFileHtml(valueStr){
	var fileArr = valueStr.split('」')
	var html = ''
	for (var j = 0; j < fileArr.length;j++) {
		var oneUrl = fileArr[j]
		var index = oneUrl.lastIndexOf("\/");  
		var fileName=oneUrl.substring(index+1,oneUrl.length);
		if (j > 0) {
			html +=','
		}
		html +=fileName;
	}
	return html
}
//详情页面方法
function getDetailPageData(type){
	var detailM = ''
	switch (type){
		case '专科活动备案':
			detailM = 'web.INMSpecialComm:GetActivity'
			break;
		case '课题专案备案':
			detailM = 'web.INMSpecialComm:GetCase'
			break;
		case '规范参与备案':
			detailM = 'web.INMSpecialComm:GetStandard'
			break;
		default:
			break;
	}
	return {'method':detailM,'type':'RecMethod'}
}

//新建页面文件名
function getZkNewPageName(type){
	var pagefileName=''
	switch (type){
		case '专科活动备案':
			pagefileName = 'zkNew'
			break;
		case '课题专案备案':
			pagefileName = 'zkNew'
			break;
		case '规范参与备案':
			pagefileName = 'zkNew'
			break;
		default:
			break;
	}
	return pagefileName
}

//"S「臧阳爽「29「0,F「小花花「1「1,T「露露「2「2"
function getZkNewAuthText(valueStr){
	var authArr = valueStr.split(',')
	var authDict = {'F':'','S':'','T':''}
	for (var i = 0; i < authArr.length;i++) {
		var oneStr = authArr[i]
		var oneArr = oneStr.split('「')
		authDict[oneArr[0]] +=  '<div class="oneAuth">'+oneArr[1]+'</div>'+
			'<div data-id="'+oneArr[2]+'" class="oneAuth">'+oneArr[2]+'</div>'
	}
	for (var id in authDict) {
		if (authDict[id] == '') {
			authDict[id] = '<div class="authSelectTip">添加作者</div>'
		}
	}
	return authDict
}

function dealUndefined(str){
	if (str == undefined || str == null) {
		return ''
	}
	return str
}

function getAbsPosition(item) {
	var actualLeft = item.offsetLeft;
	var actualTop = item.offsetTop;
	var current = item.offsetParent;
	while (current !== null) {
		actualLeft += (current.offsetLeft + current.clientLeft);
		actualTop += (current.offsetTop + current.clientTop);
		current = current.offsetParent;
	}
	return {
		'left': actualLeft,
		'top': actualTop
	};
}
function fileTypeIcon(url){
	var icon = ''
	url = url.toLowerCase()
	if (url.endsWith(".pdf")) {
		icon = 'pdf'
	}else if (url.endsWith(".png")||url.endsWith(".jpg")||url.endsWith(".jpeg")||url.endsWith(".gif")||url.endsWith(".bmp")) {
		icon = 'img'
	}else if (url.endsWith(".doc") || url.endsWith(".docx")) {
		icon = 'word'
	}else if (url.endsWith(".ppt") || url.endsWith(".pptx")) {
		icon = 'ppt'
	}else if (url.endsWith(".txt") || url.endsWith(".json")) {
		icon = 'txt'
	}else{
		icon = 'file'
	}
	return icon
}